Pseudo-classes — structure
| Pseudo-classe |
Cible |
:first-child |
Premier enfant |
:last-child |
Dernier enfant |
:nth-child(n) |
n-ième enfant |
tr:nth-child(odd) { background: white; }
tr:nth-child(even) { background: #f5f5f5; }
Usage typique : zébrage de tableaux.